Models
src/models
Elevate follows the VikiElevate model
This models can be modified by adding new extra parameters that your application needs, but you cannot remove any of the existing and mandatory properties.
All the models are in charge of parsing the raw data. This means that if your raw data has a different properties, you must modify the model to get the correct keys.
/**
* VikiElevateMenu Model
* @param {Object} rawMenu Menu
* @returns {VikiElevateMenu} menu - The {@link VikiElevateMenu} representation
*/
const menu = rawMenu => {
const { title, displaytext, items = [] } = rawMenu; // parsing here
/**
* Get the item's CMS title
* @returns {String} title
*/
const getTitle = () => {
return title;
};
/**
[...]